package Entities;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
/**
 *
 * @author Administrator
 */
public class Config {
   private String ServerName;
   private int PortNumber;
   private String Database;
   private String UserName;
   private String Password;
   PrintWriter write;
   BufferedReader reader;
   StringBuilder sb;
    public Config(){
        sb=new StringBuilder();

    }
     public void setDatabase(String Database) {
        this.Database = Database;
    }

    public void setPassword(String Password) {
        this.Password = Password;
    }

    public void setPortNumber(int PortNumber) {
        this.PortNumber = PortNumber;
    }

    public void setServerName(String ServerName) {
        this.ServerName = ServerName;
    }

    public void setUserName(String UserName) {
        this.UserName = UserName;
    }

    public String getDatabase() {
        return Database;
    }

    public String getPassword() {
        return Password;
    }

    public int getPortNumber() {
        return PortNumber;
    }

    public String getServerName() {
        return ServerName;
    }

    public String getUserName() {
        return UserName;
    }
/* public String LoadConfiguration() throws FileNotFoundException, IOException
    {
          reader=new BufferedReader(new FileReader("config.txt"));
          String tk[]=reader.readLine().split(",");
          sb.append("jdbc:sqlserver://");
          sb.append(tk[0]);
          sb.append(":");
          sb.append(tk[1]);
          sb.append(";databaseName=");
          sb.append(tk[2]);
          sb.append(";user=");
          sb.append(tk[3]);
          sb.append(";password=");
          sb.append(tk[4]);
          reader.close(); 
          return sb.toString();

  }*/

}
